package com.wiz.message;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.wiz.to.StationTO;
import com.wiz.util.HttpUtil;

/**
 * 站点修改时通知
 * @author xxy
 *
 */
@Component
public class StactionMessage {
	private HttpUtil httpUtil = new HttpUtil();
	private String URL = "http://192.168.0.108:8080/center/api/sync/";
	
	
	/**更新时*/
	public void update(StationTO station){
		
		Map<String,String> params = new HashMap<String,String>();
		params.put("stationId", station.getStationId());
		params.put("updateTime", String.valueOf(station.getUpdateTime().getTime()-30*1000));
		
		params.put("type", String.valueOf(1));
		params.put("hqId", station.getHqId());
		// 调用接口创建菜单
		String response = httpUtil.getHttpsResponseByPost(URL, params, "utf-8");
	}
	public static void main(String[] args) {
		System.out.println(new Date().getTime());
	}
}
